Component({
  data: {
    selected: 0,
    color: "#7A7E83",
    selectedColor: "#b551a9",
    list: [
      {
        pagePath: "/pages/index/index",
        iconPath: "/image/index.png",
        selectedIconPath: "/image/index.png",
        text: "首页"
      },
      {
        pagePath: "/pages/huashu/huashu",
        iconPath: "/image/huashu.png",
        selectedIconPath: "/image/huashu.png",
        text: "选花束"
      }, {
        pagePath: "/pages/huacai/huacai",
        iconPath: "/image/huaping.png",
        selectedIconPath: "/image/huaping.png",
        text: "花瓶"
      }]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({
        url
      })
      this.setData({
        selected: data.index
      })
    }
  }
})